public class Test {
    public static void fun(int[] array) {
        if(array==null){
            throw new NullPointerException();

        }
    }
    public static void main(String[] args) {

        int[] array=null;
        fun(array);
    }
}